home *** CD-ROM | disk | FTP | other *** search
- Path: news.internex.net.au!usenet
- From: sultan@connexus.apana.org.au (Jon Hornstein)
- Newsgroups: comp.lang.c++
- Subject: Re: How do I put DIFFERENT classes in the same linked list?
- Date: Fri, 12 Apr 1996 09:17:58 GMT
- Organization: connexus.apana.org.au
- Message-ID: <4kjbjh$36u@preeda.internex.net.au>
- References: <4ka938$bj6@wintermute.ecs.fullerton.edu> <4kb8cg$2mp@cocoa.brown.edu>
- NNTP-Posting-Host: dialin-4.internex.net.au
- X-Newsreader: Forte Free Agent 1.0.82
-
- cs032137@cs.brown.edu (Jeremy Rothman) wrote:
-
- TEMPLATES
-
- what about template approach as in STL for example,
-
- deque<MyClass> LinkedList;
-
- >In article <4ka938$bj6@wintermute.ecs.fullerton.edu>,
- >Gil Rosin <grosin@titan> wrote:
- >>class A
- >> {
- >> public:
- >> A *next;
- >> A *prev;
- >> void Print();
- >> };
-
- >I think that your problem is that you need to make the Print function virtual.
-
- >-- Jeremy Rothman
- > Jeremy_Rothman@brown.edu
-
-
-
-